home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / fixes / fix024 / examples / tree.ray < prev   
Text File  |  1994-08-09  |  1KB  |  52 lines

  1. /* an Oppenheimer tree: IFS with condensation set and 'leaves'
  2.  * Philippe Bekaert - dpt. computer science K.U.Leuven, Leuven, Belgium
  3.  * e-mail: philippe@cs.kuleuven.ac.be */
  4.  
  5. light 0.8 directional -2 -1 4
  6.  
  7. eyep 18 0 1.6
  8. lookp 0 -0.2 3 
  9.  
  10. surface grass
  11.         ambient 0.05 0.1 0.03
  12.         diffuse 0.5 1 0.3
  13. surface leaf
  14.         ambient 0.01 0.1 0.03
  15.         diffuse 0.1 1 0.3
  16. surface bark
  17.         ambient 0.1 0.06 0.02
  18.         diffuse 1 0.6 0.2
  19. background 0.5 0.4 1
  20.  
  21. plane grass 0 0 0  0 0 1
  22.  
  23.  
  24. define beta -90
  25. define h1 70
  26. define R1 0.7
  27. define h2 20
  28. define R2 0.9
  29. define alfa 140
  30. define l 1
  31. define r 0.9
  32. ifs     cone bark (l/15)  0 0 0  (l/15*r)  0 0 (l) ,  /* stem */
  33.     disc leaf (l/2)  (l/2) (l/2) (l/2)  1 0 0 ,    /* leaf */
  34.         rotate 0 0 1  (beta)    /* stem -> branch 1 */ 
  35.         rotate 1 0 0  (h1)
  36.         scale (R1) (R1) (R1)
  37.         translate 0 0 (l) ,     
  38.         rotate 0 0 1  (beta)    /* stem -> branch 2 */ 
  39.         rotate 1 0 0  (h2)    
  40.         rotate 0 0 1  ((alfa)-(beta))
  41.         scale (R2) (R2) (R2)
  42.         translate 0 0 (l) 
  43.     minsize 0.15      /* controls the recursion depth */
  44. end
  45.  
  46.         
  47.         
  48.         
  49.         
  50.  
  51.         
  52.